package com.ra.statis;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

import org.hibernate.annotations.LazyToOne;
import org.hibernate.annotations.LazyToOneOption;

import com.googlecode.cswish.annotation.cm;
import com.ra.landlord.LandlordUser;

@Entity
@cm("房东使用功能")
public class LandlordFunction {
	
	@cm("出租")
	public final static String PATH_RENTOUT = "/ra/landlord/agreement.addAgreement.html";
	public final static String PATH_RENTOUT2 = "/ra/landlord/room.rent.html";		// WEB - 集中式
	public final static String PATH_RENTOUT3 = "/da/landlord/daRoom.rent.html";		// WEB - 分散式
	
	@cm("收租")
	public final static String PATH_COLLECTRENT = "/ra/landlord/fee.updateFee.html";
	public final static String PATH_COLLECTRENT2 = "/ra/landlord/room.collectRental.html";	// WEB - 集中式
	public final static String PATH_COLLECTRENT3 = "/da/landlord/daRoom.collectRental.html";	// WEB - 分散式
	
	@cm("在线交租")
	public final static String PATH_PAYRENT = "/da/landlord/daConfirmMoney.confirmMoneyFromCollectForRa.html";			// 单个
	public final static String PATH_PAYRENT2 = "/ra/order/rental/rentalOrder.addRentalOrderBatch.html";					// 批量
	
	@cm("短信催费")
	public final static String PATH_REMINDER = "/ra/weixin/personality/reminderLetter.sendReminderLetter.html";
	@cm("发布房源")
	public final static String PATH_PUBLISH = "/ra/rent/roomInfo.updateRoomInfo.html";
	@cm("关注微信")
	public final static String PATH_QRCODE = "/ra/landlord/building.printBuilding.html";		// "/ra/landlord/building.showBuildingQRCode.html"
	
	private Integer id;
	
	@cm("出租")
	private Integer rentOut;
	
	@cm("收租")
	private Integer collectRent;
	
	@cm("在线交租")
	private Integer payRent;
	
	@cm("短信催费")
	private Integer reminder;
	
	@cm("发布房源")
	private Integer publish;
	
	// 统计来自该房东的微信用户
	@cm("门前扫码")
	private Integer qrCode;
	
	@cm("关注微信")
	private Boolean useWeixin;
	
	@cm("房东")
	private LandlordUser landlordUser;

	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getRentOut() {
		return rentOut;
	}

	public void setRentOut(Integer rentOut) {
		this.rentOut = rentOut;
	}

	public Integer getCollectRent() {
		return collectRent;
	}

	public void setCollectRent(Integer collectRent) {
		this.collectRent = collectRent;
	}

	public Integer getPayRent() {
		return payRent;
	}

	public void setPayRent(Integer payRent) {
		this.payRent = payRent;
	}

	public Integer getReminder() {
		return reminder;
	}

	public void setReminder(Integer reminder) {
		this.reminder = reminder;
	}

	public Integer getPublish() {
		return publish;
	}

	public void setPublish(Integer publish) {
		this.publish = publish;
	}

	public Integer getQrCode() {
		return qrCode;
	}

	public void setQrCode(Integer qrCode) {
		this.qrCode = qrCode;
	}

	public Boolean getUseWeixin() {
		return useWeixin;
	}

	public void setUseWeixin(Boolean useWeixin) {
		this.useWeixin = useWeixin;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	@LazyToOne(LazyToOneOption.PROXY)
	public LandlordUser getLandlordUser() {
		return landlordUser;
	}

	public void setLandlordUser(LandlordUser landlordUser) {
		this.landlordUser = landlordUser;
	}
}